package comm.dhee.dao;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import comm.dhee.dto.M001T002;
import comm.dhee.dto.M002;
import comm.dhee.dto.M002T002;

public class TestPR10345 {

	public static void main(String[] args) {

		PR10301DAO pr10301dao = new PR10301DAOImpl();
		PR10401DAO pr10401dao = new PR10401DAOImpl();
		PR10501DAO pr10501dao = new PR10501DAOImpl();

		try {
			//test pr10301
			List<M001T002> kokyakulist = new ArrayList<M001T002>();
			String data = "2019-03";
			kokyakulist = pr10301dao.selKokyakuList(data);
			for (M001T002 m001t002 : kokyakulist) {
				System.out.println(m001t002.getKokyakuCode());
				System.out.println(m001t002.getKokyakuMei());
				System.out.println(m001t002.getSumuriage());
			}
			System.out.println("==============================");

			//test pr10401
			List<M002T002> Shouhinlist = new ArrayList<M002T002>();
			Shouhinlist = pr10401dao.salshouhinList(data);
			for (M002T002 m002t002 : Shouhinlist) {
				System.out.println(m002t002.getShouhinCode());
				System.out.println(m002t002.getShouhinMei());
				System.out.println(m002t002.getSumuriage());
				System.out.println(m002t002.getUriageSuuryou());

			}
			System.out.println("==============================");

			//test pr10501
			M002 teM002 = new M002();
			teM002 = pr10501dao.selShouhin("10311");
			System.out.println(teM002.getShouhinMei() + "   " + teM002.getZaikoSuu());

		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}
